<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Article extends Model
{
    use HasFactory;

    protected $table = 'article';

    public $timestamps = true;

    protected $guarded = [];

    protected $primaryKey = 'id';

    public function user() {
    	return $this -> belongsTo('App\Models\User','u_id','id');
    }


    public function comment() {
    	return $this->hasMany('App\Models\Comment','a_id','id');
    }
}
